﻿{% extends "super.html" %}
{% block title %}员工管理{% endblock %}
{% block s1 %}active{% endblock %}
{% block titlehref %}index{% endblock %}
{% block titlename %}全局动态{% endblock %}
{% block subtitlehref %}{% endblock %}
{% block subtitlename %}员工管理{% endblock %}
{% block content %}
<script type="text/javascript" src="static/myjs/rc2.js"></script>
<section id="main-content">
	<section class="wrapper site-min-height">
		<!-- BEGIN ROW  -->
		<div class="row" id="t1">
			<div class="col-lg-12">
				<section class="panel">
					<header class="panel-heading">
						<button class="btn btn-success" disabled>进度查询</button>
						<span class="tools pull-right">
                        <button onclick="create()" class="btn btn-success" data-toggle="modal" data-target="#myModal">新建进度</button>
                           </span>
					</header>
					<div class="panel-body">
						<div class="adv-table">
							<table class="display table table-bordered table-striped" id="example1">
								<thead>
								<tr>
									<th>标题</th>
									<th>内容</th>
									<th>进度</th>
								</tr>
								</thead>
								<tbody>
								{%for i in list%}
								<tr>
									<td style="width: 35%">{{i.Title}}</td>
									<td style="width: 35%">{{i.Content}}</td>
									<td style="width: 10%;text-align: center">
										{%if i.Status == 1%}审核中
										<div class="progress progress-striped active progress-sm">
											<div class="progress-bar progress-bar-green set-60" role="progressbar"
											     aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">
											</div>
										</div>
										{%endif%}
										{%if i.Status == 2%}
										已通过<div class="progress progress-striped active progress-sm">
										<div class="progress-bar progress-bar-yellow set-87" role="progressbar"
										     aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">
										</div>
									</div>
										{%endif%}
										{%if i.Status == 0%}
										申请中<div class="progress progress-striped active progress-sm">
										<div class="progress-bar progress-bar-pink set-35" role="progressbar"
										     aria-valuenow="30" aria-valuemin="0" aria-valuemax="100">
										</div>
									</div>
										{%endif%}
                                        {%if i.Status == 3%}
                                        不通过<div class="progress progress-striped active progress-sm">
                                        <div class="progress-bar progress-bar-pink set-20" role="progressbar"
                                             aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
                                        </div>
                                    </div>
                                        {%endif%}
									</td>
								</tr>
								{%endfor%}
								</tbody>
							</table>
						</div>
					</div>
				</section>
			</div>
		</div>

		<!-- END ROW  -->
		<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
		     aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
							&times;
						</button>
						<h4 class="modal-title" id="myModalLabel">
							编辑进度信息
						</h4>
					</div>
					<div class="modal-body">
						<form id="updatenews" action="rc" method="post">
							<div class="panel-body">
								<input id="id" name="id" hidden>
								<input id="status" name="status" value="0" hidden>
								<input id="option" name="option" hidden>
								<div class="form-group">
									<label for="exampleInputPassword1">标题</label>
									<input type="text" class="form-control" id="title" name="title"
									       placeholder="请输入标题">
								</div>

								<div class="form-group">
									<label for="exampleInputPassword1">内容</label>
									<input type="text" class="form-control" id="content" name="content"
									       placeholder="请输入内容">
								</div>

							</div>
						</form>

					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭
						</button>
						<button id="update" type="button" class="btn btn-primary">
							提交更改
						</button>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal -->
		</div>

	</section>
</section>

<script>
	<!-- DATATABLE JS  -->
	$(document).ready(function () {
		$('#example1').dataTable({
			"aaSorting": [[4, "desc"]]
		});
		$('#example2').dataTable({
			"aaSorting": [[4, "desc"]]
		});
	});
</script>
{% endblock%}